From: Ross Lagerwall Date: Thu, 5 Mar 2015 23:38:11 +0000 (+0000) Subject: mount-operation: Handle multi-line questions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1546 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dada0420b1b0e277333726c32b1d1290504b2354;p=gnome-shell.git mount-operation: Handle multi-line questions Don't discard multiple lines when updating the message label. https://bugzilla.gnome.org/show_bug.cgi?id=745713 --- diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index a1cc81d5c..522ae0856 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -49,9 +49,9 @@ function _setButtonsForChoices(dialog, choices) { function _setLabelsForMessage(dialog, message) { let labels = message.split('\n'); - _setLabelText(dialog.subjectLabel, labels[0]); - if (labels.length > 1) - _setLabelText(dialog.descriptionLabel, labels[1]); + _setLabelText(dialog.subjectLabel, labels.shift()); + if (labels.length > 0) + _setLabelText(dialog.descriptionLabel, labels.join('\n')); } function _createIcon(gicon) {